package org.daidai.abstrusewriting.homepage.fragments;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import org.daidai.abstrusewriting.R;
import org.daidai.abstrusewriting.fragments.BaseFragment;
import org.daidai.abstrusewriting.homepage.BroadCastActivity;

/**
 * A simple {@link Fragment} subclass.
 */
public class RecommandFragment extends BaseFragment implements View.OnClickListener {


    private View ret;
    private Button broadCastBtn;

    public RecommandFragment() {
        // Required empty public constructor
    }

    @Override
    public String getFragmentTitle() {
        return "RecommandFragment";
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        ret = inflater.inflate(R.layout.fragment_recommand, container, false);
        broadCastBtn = (Button) ret.findViewById(R.id.btn_broadcast);

        broadCastBtn.setOnClickListener(this);
        return ret;
    }

    @Override
    public void onClick(View v) {
        Intent intent=new Intent(getContext(), BroadCastActivity.class);
        getContext().startActivity(intent);
    }
}
